public class Solution {
    //交换函数
    private static void swap(char[] arr,int a,int b){
        char temp=arr[a];
        arr[a]=arr[b];
        arr[b]=temp;
    }
    //左右指针，右>左 交换
    public void reverseString(char[] s) {
        int left=0;
        int right=s.length-1;
        while(left<right){
            swap(s,left,right);
            left++;
            right--;
        }

    }
}